﻿<UserControl x:Class="WFDataBaseProject.Controls.UCConnectionStringEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:helpers="clr-namespace:WFDataBaseProject.Helpers"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             Width="300" Height="300">
    <Grid>
        <Grid.Resources>
           
        </Grid.Resources>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height=".5*"/>
                <RowDefinition Height=".5*"/>
                <RowDefinition Height=".5*"/>
                <RowDefinition Height="5*"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Text="Choose the connction type: " Grid.Row="0" Margin="5,0,5,0"/>
            <ComboBox Name="cmbConnectionType" Grid.Row="1" Margin="5,0,5,0">
                <ComboBoxItem>SQL Server</ComboBoxItem>
                <ComboBoxItem>OLEDB</ComboBoxItem>
                <ComboBoxItem>ODBC</ComboBoxItem>
                <ComboBoxItem>Other</ComboBoxItem>
            </ComboBox>
            <TextBlock Text="Enter the connction string: " Grid.Row="2" Margin="5,0,5,0"/>
            <Border BorderThickness="2" BorderBrush="Black" Grid.Row="3" Margin="5,5,5,5">
                <TextBox Name="txtConnectionString" Text="{Binding Path=ConnectionString,Mode=TwoWay}"  Grid.Row="3" TextWrapping="Wrap" />
            </Border>
            <Grid Grid.Row="4" Margin="5,5,5,5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Button Content="Test connection" Name="btnTestConnection" Margin="2,2,2,2" Grid.Column="0" Click="btnTestConnection_Click" />
                <Button Content="OK"  Name="btnOK" Grid.Column="2" Margin="2,2,2,2" Click="btnOK_Click" />
                <Button Content="Cancel" Name="btnCancel"  Grid.Column="3" Margin="2,2,2,2" Click="btnCancel_Click" />
            </Grid>
        </Grid>    
    </Grid>
</UserControl>
